<template>
  <div>
    <div class="container">
      <div class="banner_img">
        <img src="https://p1-q.mafengwo.net/s12/M00/73/F8/wKgED1uVyeaABZqoAAGHzYHr4BQ93.jpeg" alt />
      </div>
      <div class="tabbar">
        <div class="tabbar_banner">
          <van-tabs v-model="active">
            <van-tab title="国内机票" class="tab_font">
              <div class="gnjp">
                <div class="mudd">
                  <router-link to="/jps">
                    <span>北京</span>
                  </router-link>

                  <span class="place-fm">
                    <i class="places-circle"></i>
                    <i class="places-plane"></i>
                  </span>

                  <span>
                    <router-link to="/jps">上海</router-link>
                  </span>
                </div>
                <div class="data">
                  <div class="data_left">
                    <p>出发时间</p>
                    <p>9月24日</p>
                  </div>
                  <div class="data_right">
                    <p>
                      返回日期
                      <van-cell title=" " :value="date" @click="show = true" style="padding:-10px" />
                      <van-calendar
                        v-model="show"
                        type="range"
                        @confirm="onConfirm"
                        style="padding:-10px"
                      />
                    </p>
                    <p>添加返程</p>
                  </div>
                </div>
                <div class="babay">
                  <div class="babay_banner">
                    <div class="banner_left">
                      <van-checkbox v-model="checked" checked-color="#FFE03F">
                        携带儿童
                        <span style="font-size:12px">2-12岁</span>
                      </van-checkbox>
                    </div>
                    <div class="banner_right">儿童票预定说明</div>
                  </div>
                </div>
                <div class="search">
                  <router-link to="/jipbuy">
                    <van-button type="primary" size="large" class="search_s">搜索</van-button>
                  </router-link>
                </div>
              </div>
              <div class="login_title">
                <div class="login_tbanner">
                  <img src="~assets/img/jip/bot_login.png" alt />

                  <p class="text">如实出票 • 出行保障 • 标准退改 • 先行赔付</p>
                </div>
              </div>
            </van-tab>
            <van-tab title="国际机票" class="tab_font">
              <!-- ============================ -->

              <div class="gnjp">
                <div class="mudd">
                  <router-link to="/jps">
                    <span>北京</span>
                  </router-link>

                  <span class="place-fm">
                    <i class="places-circle"></i>
                    <i class="places-plane"></i>
                  </span>

                  <span>
                    <router-link to="/jps">上海</router-link>
                  </span>
                </div>
                <div class="data">
                  <div class="data_left">
                    <p>出发时间</p>
                    <p>9月24日</p>
                  </div>
                  <div class="data_right">
                    <p style="padding:-10px">
                      返回日期
                      <van-cell
                        title=" "
                        :value="date"
                        @click="show = true"
                        style="padding:-1px 16px"
                      />
                      <van-calendar
                        v-model="show"
                        type="range"
                        @confirm="onConfirm"
                        style="padding:-1px 16px"
                      />
                    </p>
                    <p>添加返程</p>
                  </div>
                </div>
                <div class="man_one">1成人</div>
                <div class="search">
                  <router-link to="/jipbuy">
                    <van-button type="primary" size="large" class="search_s">搜索</van-button>
                  </router-link>
                </div>
              </div>
              <div class="login_title">
                <div class="login_tbanner">
                  <img src="~assets/img/jip/bot_login.png" alt />

                  <p class="text">如实出票 • 出行保障 • 标准退改 • 先行赔付</p>
                </div>
              </div>
              <!-- ====================== -->
            </van-tab>
          </van-tabs>
        </div>
      </div>
    </div>
  </div>
</template>
 <script>
</script>

 
<script>
export default {
  data() {
    return {
      active: "1",
      checked: true,
      date: "",
      show: false,
    };
  },
  methods: {
    formatDate(date) {
      return `${date.getMonth() + 1}/${date.getDate()}`;
    },
    onConfirm(date) {
      const [start, end] = date;
      this.show = false;
      this.date = `${this.formatDate(start)} - ${this.formatDate(end)}`;
    },
  },
};
</script>
<style scoped>
.container {
  background: #f6f7f9;
}
.banner_img {
  position: relative;
  display: flex;
  height: 258.33px;
}
.banner_img img {
  position: absolute;
  width: 100%;
  height: 100%;
}
.tabbar {
  position: relative;
  height: 301.44px;
  width: 100%;
  padding: 0 10px;
}
.van-tab {
  display: block;
  font-size: 16px;
  color: #242629;
  text-align: center;
  font-weight: 600;
  line-height: 36px;
}
.tabbar_banner {
  width: 100%;
  height: 100%;
  /* background: pink; */
  margin-top: -30px;
  border-radius: 10px;
}
.gnjp {
  width: 100%;
  padding: 13.248px;
  background: white;
}
.mudd {
  height: 44.16px;
  padding-bottom: 5px;
}
.mudd span {
  float: left;
  display: block;
  width: 33.33%;
  height: 100%;
  line-height: 44.16px;
  font-size: 26px;
  color: #474747;
  font-weight: 600;
}
.mudd span:nth-child(3) {
  text-align: right;
}
.place-fm {
  padding-left: 10%;
  position: relative;
}
.places-circle {
  /* margin:0 auto; */
  width: 44.16px;
  height: 44.16px;
  display: block;
  background: url("~assets/img/jip/quan.png") no-repeat;
  background-size: 100%;
}
.places-plane {
  /* margin:0 33px; */
  width: 44.16px;
  height: 44.16px;
  position: absolute;
  display: block;
  background: url("~assets/img/jip/fj.png") no-repeat;
  background-size: 100%;
  top: 0;
}
.data {
  display: flex;
  width: 100%;
  padding: 10px 0 5px 0;
  color: #bdbfc2;
  font-size: 10px;
}
.data_left {
  width: 50%;
  height: 43.48px;
}
.data_left p:last-child {
  font-size: 16px;
  color: #474747;
  font-weight: 600;
}
.data_right {
  text-align: right;
  width: 50%;
}
.data_right p:last-child {
  display: block;
  height: 26.48px;
  font-size: 19.87px;
  color: #e3e5e8;
  background: url("~assets/img/jip/data.png") no-repeat;
  background-size: 18%;
  background-position: 40% 40%;
  margin-top: -2px;
}

.babay {
  padding: 14px 0 22px;
}
.babay_banner {
  width: 100%;
  height: 24px;
}
.banner_left {
  float: left;

  width: 50%;
  height: 15px;
  font-size: 17px;
  color: #474747;
  font-weight: 600;
}
.banner_right {
  float: left;
  text-align: right;
  width: 50%;
  height: 15px;
  font-size: 12px;
  color: #474747;
}
.search_s {
  background: #ffe03f;
  border-radius: 30px;
  color: #000;
  font-size: 15px;
  border: 0;
}
.login_title {
  width: 100%;
  padding: 18px 0 14px;
}
.login_tbanner {
  width: 100%;
  height: 77px;
  background: #f6f7f9;
  border-bottom-right-radius: 30px;
  border-bottom-left-radius: 30px;
  text-align: center;
}
.login_tbanner img {
  width: 63px;
  height: 19px;
}
.login_tbanner .text {
  padding: 10px;
  font-size: 10px;
}
.van-cell__title {
  position: absolute;
  display: block;
  width: 10px;
  height: 43.48px;
  margin-top: 4px;
}
/* 国际机票 */
.man_one {
  text-align: right;
  height: 26px;
  font-size: 15px;
  font-weight: 600;
  color: #474747;
  padding: 13px 0 22px;
}
</style>

